import request from '/@/utils/request';

export function getSizeCountByType(query?: Object) {
    return request({
        url: '/api/v1/attachment/type/statistic',
        method: 'get',
        params: query
    })
}
export function getUploadLatest(query?: Object) {
    return request({
        url: '/api/v1/attachment/upload/latest',
        method: 'get',
        params: query
    })
}

export function getFileList(query?: Object) {
    return request({
        url: '/api/v1/attachment/file/list',
        method: 'get',
        params: query
    })
}

export function getOnlyFileList(query?: Object) {
    return request({
        url: '/api/v1/attachment/file/only/list',
        method: 'get',
        params: query
    })
}
export function addFile(data?: Object) {
    return request({
        url: '/api/v1/attachment/file/add',
        method: 'post',
        data: data
    })
}
export function remarkFile(data?: Object) {
    return request({
        url: '/api/v1/attachment/file/remark',
        method: 'post',
        data: data
    })
}
export function getFileInfo(query?: Object) {
    return request({
        url: '/api/v1/attachment/file/detail',
        method: 'get',
        params: query
    })
}
export function deleteFile(params?: Object) {
    return request({
        url: '/api/v1/attachment/file/delete',
        method: 'delete',
        data: params
    })
}
export function getDirectoryTree(query?: Object) {
    return request({
        url: '/api/v1/attachment/directory/tree',
        method: 'get',
        params: query
    })
}
export function getDirectory(query?: Object) {
    return request({
        url: '/api/v1/attachment/directory/detail',
        method: 'get',
        params: query
    })
}
export function addDirectory(params?: Object) {
    return request({
        url: '/api/v1/attachment/directory/add',
        method: 'post',
        data: params
    })
}
export function moveObject(data?: Object) {
    return request({
        url: '/api/v1/attachment/object/move',
        method: 'post',
        data: data
    })
}
export function updateDirectory(params?: Object) {
    return request({
        url: '/api/v1/attachment/directory/update',
        method: 'put',
        data: params
    })
}
export function deleteDirectory(params?: Object) {
    return request({
        url: '/api/v1/attachment/directory/delete',
        method: 'delete',
        data: params
    })
}

